3.1.61 \(\int \frac {a+b \tanh ^{-1}(c x^2)}{x^2} \, dx\) [61]

Optimal. Leaf size=46 \[ b \sqrt {c} \text {ArcTan}\left (\sqrt {c} x\right )+b \sqrt {c} \tanh ^{-1}\left (\sqrt {c} x\right )-\frac {a+b \tanh ^{-1}\left (c x^2\right )}{x} \]

[Out]

(-a-b*arctanh(c*x^2))/x+b*arctan(x*c^(1/2))*c^(1/2)+b*arctanh(x*c^(1/2))*c^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {6037, 218, 212, 209} \begin {gather*} -\frac {a+b \tanh ^{-1}\left (c x^2\right )}{x}+b \sqrt {c} \text {ArcTan}\left (\sqrt {c} x\right )+b \sqrt {c} \tanh ^{-1}\left (\sqrt {c} x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTanh[c*x^2])/x^2,x]

[Out]

b*Sqrt[c]*ArcTan[Sqrt[c]*x] + b*Sqrt[c]*ArcTanh[Sqrt[c]*x] - (a + b*ArcTanh[c*x^2])/x

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 218

Int[((a_) + (b_.)*(x_)^4)^(-1), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2]], s = Denominator[Rt[-a/b, 2]]},
Dist[r/(2*a), Int[1/(r - s*x^2), x], x] + Dist[r/(2*a), Int[1/(r + s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !Gt
Q[a/b, 0]

Rule 6037

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTanh[c*
x^n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))
), x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1
]

Rubi steps

\begin {align*} \int \frac {a+b \tanh ^{-1}\left (c x^2\right )}{x^2} \, dx &=-\frac {a+b \tanh ^{-1}\left (c x^2\right )}{x}+(2 b c) \int \frac {1}{1-c^2 x^4} \, dx\\ &=-\frac {a+b \tanh ^{-1}\left (c x^2\right )}{x}+(b c) \int \frac {1}{1-c x^2} \, dx+(b c) \int \frac {1}{1+c x^2} \, dx\\ &=b \sqrt {c} \tan ^{-1}\left (\sqrt {c} x\right )+b \sqrt {c} \tanh ^{-1}\left (\sqrt {c} x\right )-\frac {a+b \tanh ^{-1}\left (c x^2\right )}{x}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 75, normalized size = 1.63 \begin {gather*} -\frac {a}{x}+b \sqrt {c} \text {ArcTan}\left (\sqrt {c} x\right )-\frac {b \tanh ^{-1}\left (c x^2\right )}{x}-\frac {1}{2} b \sqrt {c} \log \left (1-\sqrt {c} x\right )+\frac {1}{2} b \sqrt {c} \log \left (1+\sqrt {c} x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTanh[c*x^2])/x^2,x]

[Out]

-(a/x) + b*Sqrt[c]*ArcTan[Sqrt[c]*x] - (b*ArcTanh[c*x^2])/x - (b*Sqrt[c]*Log[1 - Sqrt[c]*x])/2 + (b*Sqrt[c]*Lo
g[1 + Sqrt[c]*x])/2

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 42, normalized size = 0.91

method result size
default \(-\frac {a}{x}-\frac {b \arctanh \left (c \,x^{2}\right )}{x}+b \arctanh \left (x \sqrt {c}\right ) \sqrt {c}+b \arctan \left (x \sqrt {c}\right ) \sqrt {c}\) \(42\)
risch \(-\frac {b \ln \left (c \,x^{2}+1\right )}{2 x}+b \arctan \left (x \sqrt {c}\right ) \sqrt {c}-\frac {a}{x}+\frac {b \ln \left (-c \,x^{2}+1\right )}{2 x}+b \arctanh \left (x \sqrt {c}\right ) \sqrt {c}\) \(59\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctanh(c*x^2))/x^2,x,method=_RETURNVERBOSE)

[Out]

-a/x-b/x*arctanh(c*x^2)+b*arctanh(x*c^(1/2))*c^(1/2)+b*arctan(x*c^(1/2))*c^(1/2)

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 61, normalized size = 1.33 \begin {gather*} \frac {1}{2} \, {\left (c {\left (\frac {2 \, \arctan \left (\sqrt {c} x\right )}{\sqrt {c}} - \frac {\log \left (\frac {c x - \sqrt {c}}{c x + \sqrt {c}}\right )}{\sqrt {c}}\right )} - \frac {2 \, \operatorname {artanh}\left (c x^{2}\right )}{x}\right )} b - \frac {a}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x^2))/x^2,x, algorithm="maxima")

[Out]

1/2*(c*(2*arctan(sqrt(c)*x)/sqrt(c) - log((c*x - sqrt(c))/(c*x + sqrt(c)))/sqrt(c)) - 2*arctanh(c*x^2)/x)*b -
a/x

________________________________________________________________________________________

Fricas [A] Leaf count of result is larger than twice the leaf count of optimal. 82 vs. \(2 (38) = 76\).
time = 0.38, size = 157, normalized size = 3.41 \begin {gather*} \left [\frac {2 \, b \sqrt {c} x \arctan \left (\sqrt {c} x\right ) + b \sqrt {c} x \log \left (\frac {c x^{2} + 2 \, \sqrt {c} x + 1}{c x^{2} - 1}\right ) - b \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) - 2 \, a}{2 \, x}, -\frac {2 \, b \sqrt {-c} x \arctan \left (\sqrt {-c} x\right ) - b \sqrt {-c} x \log \left (\frac {c x^{2} + 2 \, \sqrt {-c} x - 1}{c x^{2} + 1}\right ) + b \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a}{2 \, x}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x^2))/x^2,x, algorithm="fricas")

[Out]

[1/2*(2*b*sqrt(c)*x*arctan(sqrt(c)*x) + b*sqrt(c)*x*log((c*x^2 + 2*sqrt(c)*x + 1)/(c*x^2 - 1)) - b*log(-(c*x^2
 + 1)/(c*x^2 - 1)) - 2*a)/x, -1/2*(2*b*sqrt(-c)*x*arctan(sqrt(-c)*x) - b*sqrt(-c)*x*log((c*x^2 + 2*sqrt(-c)*x
- 1)/(c*x^2 + 1)) + b*log(-(c*x^2 + 1)/(c*x^2 - 1)) + 2*a)/x]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1374 vs. \(2 (42) = 84\).
time = 4.70, size = 1374, normalized size = 29.87 \begin {gather*} \begin {cases} - \frac {a}{x} & \text {for}\: c = 0 \\- \frac {a - \infty b}{x} & \text {for}\: c = - \frac {1}{x^{2}} \\- \frac {a + \infty b}{x} & \text {for}\: c = \frac {1}{x^{2}} \\- \frac {a c x^{4} \sqrt {- \frac {1}{c}}}{c x^{5} \sqrt {- \frac {1}{c}} + c x^{5} \sqrt {\frac {1}{c}} - \frac {x \sqrt {- \frac {1}{c}}}{c} - \frac {x \sqrt {\frac {1}{c}}}{c}} - \frac {a c x^{4} \sqrt {\frac {1}{c}}}{c x^{5} \sqrt {- \frac {1}{c}} + c x^{5} \sqrt {\frac {1}{c}} - \frac {x \sqrt {- \frac {1}{c}}}{c} - \frac {x \sqrt {\frac {1}{c}}}{c}} + \frac {a \sqrt {- \frac {1}{c}}}{c^{2} x^{5} \sqrt {- \frac {1}{c}} + c^{2} x^{5} \sqrt {\frac {1}{c}} - x \sqrt {- \frac {1}{c}} - x \sqrt {\frac {1}{c}}} + \frac {a \sqrt {\frac {1}{c}}}{c^{2} x^{5} \sqrt {- \frac {1}{c}} + c^{2} x^{5} \sqrt {\frac {1}{c}} - x \sqrt {- \frac {1}{c}} - x \sqrt {\frac {1}{c}}} + \frac {b c^{2} x^{5} \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{c x^{5} \sqrt {- \frac {1}{c}} + c x^{5} \sqrt {\frac {1}{c}} - \frac {x \sqrt {- \frac {1}{c}}}{c} - \frac {x \sqrt {\frac {1}{c}}}{c}} - \frac {b c^{2} x^{5} \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}} \log {\left (x - \sqrt {\frac {1}{c}} \right )}}{c x^{5} \sqrt {- \frac {1}{c}} + c x^{5} \sqrt {\frac {1}{c}} - \frac {x \sqrt {- \frac {1}{c}}}{c} - \frac {x \sqrt {\frac {1}{c}}}{c}} - \frac {b c^{2} x^{5} \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{c x^{5} \sqrt {- \frac {1}{c}} + c x^{5} \sqrt {\frac {1}{c}} - \frac {x \sqrt {- \frac {1}{c}}}{c} - \frac {x \sqrt {\frac {1}{c}}}{c}} + \frac {b c x^{5} \log {\left (x - \sqrt {- \frac {1}{c}} \right )}}{c x^{5} \sqrt {- \frac {1}{c}} + c x^{5} \sqrt {\frac {1}{c}} - \frac {x \sqrt {- \frac {1}{c}}}{c} - \frac {x \sqrt {\frac {1}{c}}}{c}} - \frac {b c x^{5} \log {\left (x - \sqrt {\frac {1}{c}} \right )}}{c x^{5} \sqrt {- \frac {1}{c}} + c x^{5} \sqrt {\frac {1}{c}} - \frac {x \sqrt {- \frac {1}{c}}}{c} - \frac {x \sqrt {\frac {1}{c}}}{c}} - \frac {b c x^{5} \operatorname {atanh}{\left (c x^{2} \right )}}{c x^{5} \sqrt {- \frac {1}{c}} + c x^{5} \sqrt {\frac {1}{c}} - \frac {x \sqrt {- \frac {1}{c}}}{c} - \frac {x \sqrt {\frac {1}{c}}}{c}} - \frac {b c x^{4} \sqrt {- \frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{c x^{5} \sqrt {- \frac {1}{c}} + c x^{5} \sqrt {\frac {1}{c}} - \frac {x \sqrt {- \frac {1}{c}}}{c} - \frac {x \sqrt {\frac {1}{c}}}{c}} - \frac {b c x^{4} \sqrt {\frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{c x^{5} \sqrt {- \frac {1}{c}} + c x^{5} \sqrt {\frac {1}{c}} - \frac {x \sqrt {- \frac {1}{c}}}{c} - \frac {x \sqrt {\frac {1}{c}}}{c}} - \frac {b x \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}} \log {\left (x + \sqrt {- \frac {1}{c}} \right )}}{c x^{5} \sqrt {- \frac {1}{c}} + c x^{5} \sqrt {\frac {1}{c}} - \frac {x \sqrt {- \frac {1}{c}}}{c} - \frac {x \sqrt {\frac {1}{c}}}{c}} + \frac {b x \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}} \log {\left (x - \sqrt {\frac {1}{c}} \right )}}{c x^{5} \sqrt {- \frac {1}{c}} + c x^{5} \sqrt {\frac {1}{c}} - \frac {x \sqrt {- \frac {1}{c}}}{c} - \frac {x \sqrt {\frac {1}{c}}}{c}} + \frac {b x \sqrt {- \frac {1}{c}} \sqrt {\frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{c x^{5} \sqrt {- \frac {1}{c}} + c x^{5} \sqrt {\frac {1}{c}} - \frac {x \sqrt {- \frac {1}{c}}}{c} - \frac {x \sqrt {\frac {1}{c}}}{c}} - \frac {b x \log {\left (x - \sqrt {- \frac {1}{c}} \right )}}{c^{2} x^{5} \sqrt {- \frac {1}{c}} + c^{2} x^{5} \sqrt {\frac {1}{c}} - x \sqrt {- \frac {1}{c}} - x \sqrt {\frac {1}{c}}} + \frac {b x \log {\left (x - \sqrt {\frac {1}{c}} \right )}}{c^{2} x^{5} \sqrt {- \frac {1}{c}} + c^{2} x^{5} \sqrt {\frac {1}{c}} - x \sqrt {- \frac {1}{c}} - x \sqrt {\frac {1}{c}}} + \frac {b x \operatorname {atanh}{\left (c x^{2} \right )}}{c^{2} x^{5} \sqrt {- \frac {1}{c}} + c^{2} x^{5} \sqrt {\frac {1}{c}} - x \sqrt {- \frac {1}{c}} - x \sqrt {\frac {1}{c}}} + \frac {b \sqrt {- \frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{c^{2} x^{5} \sqrt {- \frac {1}{c}} + c^{2} x^{5} \sqrt {\frac {1}{c}} - x \sqrt {- \frac {1}{c}} - x \sqrt {\frac {1}{c}}} + \frac {b \sqrt {\frac {1}{c}} \operatorname {atanh}{\left (c x^{2} \right )}}{c^{2} x^{5} \sqrt {- \frac {1}{c}} + c^{2} x^{5} \sqrt {\frac {1}{c}} - x \sqrt {- \frac {1}{c}} - x \sqrt {\frac {1}{c}}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atanh(c*x**2))/x**2,x)

[Out]

Piecewise((-a/x, Eq(c, 0)), (-(a - oo*b)/x, Eq(c, -1/x**2)), (-(a + oo*b)/x, Eq(c, x**(-2))), (-a*c*x**4*sqrt(
-1/c)/(c*x**5*sqrt(-1/c) + c*x**5*sqrt(1/c) - x*sqrt(-1/c)/c - x*sqrt(1/c)/c) - a*c*x**4*sqrt(1/c)/(c*x**5*sqr
t(-1/c) + c*x**5*sqrt(1/c) - x*sqrt(-1/c)/c - x*sqrt(1/c)/c) + a*sqrt(-1/c)/(c**2*x**5*sqrt(-1/c) + c**2*x**5*
sqrt(1/c) - x*sqrt(-1/c) - x*sqrt(1/c)) + a*sqrt(1/c)/(c**2*x**5*sqrt(-1/c) + c**2*x**5*sqrt(1/c) - x*sqrt(-1/
c) - x*sqrt(1/c)) + b*c**2*x**5*sqrt(-1/c)*sqrt(1/c)*log(x + sqrt(-1/c))/(c*x**5*sqrt(-1/c) + c*x**5*sqrt(1/c)
 - x*sqrt(-1/c)/c - x*sqrt(1/c)/c) - b*c**2*x**5*sqrt(-1/c)*sqrt(1/c)*log(x - sqrt(1/c))/(c*x**5*sqrt(-1/c) +
c*x**5*sqrt(1/c) - x*sqrt(-1/c)/c - x*sqrt(1/c)/c) - b*c**2*x**5*sqrt(-1/c)*sqrt(1/c)*atanh(c*x**2)/(c*x**5*sq
rt(-1/c) + c*x**5*sqrt(1/c) - x*sqrt(-1/c)/c - x*sqrt(1/c)/c) + b*c*x**5*log(x - sqrt(-1/c))/(c*x**5*sqrt(-1/c
) + c*x**5*sqrt(1/c) - x*sqrt(-1/c)/c - x*sqrt(1/c)/c) - b*c*x**5*log(x - sqrt(1/c))/(c*x**5*sqrt(-1/c) + c*x*
*5*sqrt(1/c) - x*sqrt(-1/c)/c - x*sqrt(1/c)/c) - b*c*x**5*atanh(c*x**2)/(c*x**5*sqrt(-1/c) + c*x**5*sqrt(1/c)
- x*sqrt(-1/c)/c - x*sqrt(1/c)/c) - b*c*x**4*sqrt(-1/c)*atanh(c*x**2)/(c*x**5*sqrt(-1/c) + c*x**5*sqrt(1/c) -
x*sqrt(-1/c)/c - x*sqrt(1/c)/c) - b*c*x**4*sqrt(1/c)*atanh(c*x**2)/(c*x**5*sqrt(-1/c) + c*x**5*sqrt(1/c) - x*s
qrt(-1/c)/c - x*sqrt(1/c)/c) - b*x*sqrt(-1/c)*sqrt(1/c)*log(x + sqrt(-1/c))/(c*x**5*sqrt(-1/c) + c*x**5*sqrt(1
/c) - x*sqrt(-1/c)/c - x*sqrt(1/c)/c) + b*x*sqrt(-1/c)*sqrt(1/c)*log(x - sqrt(1/c))/(c*x**5*sqrt(-1/c) + c*x**
5*sqrt(1/c) - x*sqrt(-1/c)/c - x*sqrt(1/c)/c) + b*x*sqrt(-1/c)*sqrt(1/c)*atanh(c*x**2)/(c*x**5*sqrt(-1/c) + c*
x**5*sqrt(1/c) - x*sqrt(-1/c)/c - x*sqrt(1/c)/c) - b*x*log(x - sqrt(-1/c))/(c**2*x**5*sqrt(-1/c) + c**2*x**5*s
qrt(1/c) - x*sqrt(-1/c) - x*sqrt(1/c)) + b*x*log(x - sqrt(1/c))/(c**2*x**5*sqrt(-1/c) + c**2*x**5*sqrt(1/c) -
x*sqrt(-1/c) - x*sqrt(1/c)) + b*x*atanh(c*x**2)/(c**2*x**5*sqrt(-1/c) + c**2*x**5*sqrt(1/c) - x*sqrt(-1/c) - x
*sqrt(1/c)) + b*sqrt(-1/c)*atanh(c*x**2)/(c**2*x**5*sqrt(-1/c) + c**2*x**5*sqrt(1/c) - x*sqrt(-1/c) - x*sqrt(1
/c)) + b*sqrt(1/c)*atanh(c*x**2)/(c**2*x**5*sqrt(-1/c) + c**2*x**5*sqrt(1/c) - x*sqrt(-1/c) - x*sqrt(1/c)), Tr
ue))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 79 vs. \(2 (38) = 76\).
time = 0.44, size = 79, normalized size = 1.72 \begin {gather*} \frac {1}{2} \, b c {\left (\frac {2 \, \arctan \left (x \sqrt {{\left | c \right |}}\right )}{\sqrt {{\left | c \right |}}} + \frac {\log \left ({\left | x + \frac {1}{\sqrt {{\left | c \right |}}} \right |}\right )}{\sqrt {{\left | c \right |}}} - \frac {\log \left ({\left | x - \frac {1}{\sqrt {{\left | c \right |}}} \right |}\right )}{\sqrt {{\left | c \right |}}}\right )} - \frac {b \log \left (-\frac {c x^{2} + 1}{c x^{2} - 1}\right )}{2 \, x} - \frac {a}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x^2))/x^2,x, algorithm="giac")

[Out]

1/2*b*c*(2*arctan(x*sqrt(abs(c)))/sqrt(abs(c)) + log(abs(x + 1/sqrt(abs(c))))/sqrt(abs(c)) - log(abs(x - 1/sqr
t(abs(c))))/sqrt(abs(c))) - 1/2*b*log(-(c*x^2 + 1)/(c*x^2 - 1))/x - a/x

________________________________________________________________________________________

Mupad [B]
time = 0.92, size = 62, normalized size = 1.35 \begin {gather*} b\,\sqrt {c}\,\mathrm {atan}\left (\sqrt {c}\,x\right )-\frac {a}{x}-\frac {b\,\ln \left (c\,x^2+1\right )}{2\,x}+\frac {b\,\ln \left (1-c\,x^2\right )}{2\,x}-b\,\sqrt {c}\,\mathrm {atan}\left (\sqrt {c}\,x\,1{}\mathrm {i}\right )\,1{}\mathrm {i} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atanh(c*x^2))/x^2,x)

[Out]

b*c^(1/2)*atan(c^(1/2)*x) - a/x - b*c^(1/2)*atan(c^(1/2)*x*1i)*1i - (b*log(c*x^2 + 1))/(2*x) + (b*log(1 - c*x^
2))/(2*x)

________________________________________________________________________________________